qq.draw <- function()
{
	
}

qq.unif <- function(x, method="mle", q = "rnd")
{
    a = est.unif(x,method)[1];
    b = est.unif(x,method)[2];
    
    x=sort(x);
    
    rsample = sort(runif(length(x),min=a,max=b));
    comparison = lm(x~rsample);
    
    plot(x,rsample);
    abline(comparison);
    
    summary(comparison);
}

qq.norm <- function(x, method="mle", q = "rnd")
{
    a = est.norm(x,method)[1];
    b = est.norm(x,method)[2];
    
    x=sort(x);
    
    rsample = sort(rnorm(length(x),mean=a,sd=sqrt(b)));
    comparison = lm(x~rsample);
    
    plot(x,rsample);
    abline(comparison);  
    
    summary(comparison);
}

dcomp.unif <- function(x,hist = "F")
{
    a=min(x);
    b=max(x);
    
    if (hist == "F")
    {
        hist(x);
        curve(1/(b-a)+0*x,add=T);
    }
    else if (hist == "T")
    {
        plot(density(x));
        curve(1/(b-a)+0*x,add=T);
    }
    else
    {
        cat("Invalid Argument");
    }
}
